#!/bin/bash
rpm -import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
yum install -y https://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
yum --disablerepo="*" --enablerepo="elrepo-kernel" list available
yum --enablerepo=elrepo-kernel install -y kernel-ml kernel-ml-devel --skip-broken 
yum remove kernel-3.10.0-957.el7.x86_64 -y
yum remove kernel-3.10.0-957.21.3.el7.x86_64 -y
yum remove kernel-tools-3.10.0-957.21.3.el7.x86_64 -y
yum remove kernel-tools-libs-3.10.0-957.21.3.el7.x86_64 -y
yum upgrade -y
yum --enablerepo=elrepo-kernel install kernel-ml-tools   kernel-ml-tools-libs -y --skip-broken 
yum remove kernel-3.10.0-957.el7.x86_64 -y
yum remove kernel-3.10.0-957.el7.x86_64 -y
awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg
#grub2-set-default 'CentOS Linux (5.19.6-1.el7.elrepo.x86_64) 7 (Core)'
grub2-set-default 0
grub2-editenv list
#reboot
